#include<iostream>
#include"test.h"
#include<cstring>
using namespace std;

Test::Test(int a):m_a(a)
{
	this->m_p = new int[a];
	cout << "这不是默认的构造方法" << endl;
}

Test::~Test()
{
	cout << "析构方法被调用了" << endl;
	delete[] m_p;
	m_p = NULL;
}
Test::Test(const Test &t)
{
	this->m_p = new int[t.m_a];
	this->m_a = t.m_a;

	memcpy(this->m_p, t.m_p, this->m_a*sizeof(int));
}
